<form id="add-form" class="form-horizontal" method="POST"  action="{:url('fsave')}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">应用范畴名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="name" value="{$data['name']|default=''}" class="form-control"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">应用开发模式:</label>
        <div class="col-xs-12 col-sm-8">
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;">
                <input style="position: relative;top: 2px;" name="develop_model" value="1" 
                {if condition="(!empty($data)) AND $data['develop_model'] == 1"}checked{/if} type="checkbox">系统服务</label>
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;">
                <input style="position: relative;top: 2px;" name="develop_model" value="2"
                 {if condition="(!empty($data)) AND $data['develop_model'] == 2"}checked{/if} type="checkbox">单一服务</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">应用版本支持:</label>
        <div class="col-xs-12 col-sm-8">
          {volist name="versions" id="vo"}
               <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="version_id[]" value="{$vo.id}" {if condition="(!empty($data)) AND in_array($vo['id'],$data['version_id'])"}checked{/if} type="checkbox">{$vo.name}</label>  
          {/volist}
           
            <label style="font-weight: normal;margin-right: 15px;cursor: pointer;"><input style="position: relative;top: 2px;" name="version_id[]" value="0" {if condition="(!empty($data)) AND $data['version_id'] == 0"}checked{/if} type="checkbox">无</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">应用范畴描述:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea type="text" name="des" class="form-control">{$data['des']|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input type="hidden" name="id" value="{$data['id']|default=''}" class="form-control"/>
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
        </div>
    </div>
</form>